-- hs.hotkey.bind({ "cmd", "shift" }, "D", function()
-- 	local applescript = hs.osascript.applescript
-- 	local setDockAutohideScript = [[
-- 	tell application "System Events"
-- 		tell dock preferences
-- 			set autohide to %s
-- 		end tell
-- 	end tell
-- ]]
-- 	applescript(setDockAutohideScript:format("not autohide"))
-- 	hs.reload()
-- 	-- reload for window manager
-- end)
-- hs.hotkey.bind({ "cmd", "ctrl" }, "s", function()
-- 	hs.caffeinate.systemSleep()
-- end)
-- function toggleMenuBarHidden()
-- 	local script = [[
--         tell application "System Events"
--             tell dock preferences
--                 set autohide menu bar to not autohide menu bar
--             end tell
--         end tell
--     ]]
-- 	hs.osascript.applescript(script)
-- end
-- hs.hotkey.bind({ "cmd", "shift" }, "M", function()
-- 	toggleMenuBarHidden()
-- end)
-- hs.hotkey.bind({ "ctrl", "cmd" }, "q", function()
-- 	-- 先锁屏
-- 	hs.caffeinate.lockScreen()
-- 	-- 延时 1 秒，等锁屏完成再执行熄屏
-- 	hs.timer.doAfter(0.5, function()
-- 		hs.execute("pmset displaysleepnow")
-- 	end)
-- end)
